home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 32
/
032.d81
/
watch your langu
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
9KB
|
262 lines
2 sw=5:bk$="[164]"
3 poke53280,.:poke53281,.:print"[147]":poke650,128
4 es$=" "
5 dimvt$(24),ht$(40),g$(30)
6 vt$(1)=chr$(19):fori=2to24:vt$(i)=vt$(i-1)+chr$(17):next
7 ht$(1)=chr$(145)+chr$(13):fori=2to40:ht$(i)=ht$(i-1)+chr$(29):next
10 rem==================
11 rem= jeff truelsen
20 rem= 700 warren road
30 rem= apartment 20-2e
40 rem= ithaca, ny 14850
45 rem==================
50 gosub10000: rem init
1000 remmain menu
1010 print"[147]"vt$(3)ht$(12);
1015 print"[204]oadstar [208]resents":printvt$(6);:gosub12500
1020 printvt$(12)ht$(19)"[158]by"vt$(14)ht$(12);
1025 print"[129][202]eff [211]. [212]ruelsen"vt$(16)ht$(7);
1027 print "([153][195]) 1986 [199]uanozap [211]oftware"vt$(18)ht$(8);
1028 print"[206]ot in the [208]ublic [196]omain"
1030 rem window
1040 printvt$(21)"[154]>-->-->[159][208]ress any key to [195]ontinue[154]<--<--<"
1042 forpa=1to70:nextpa:getkb$:ifkb$=""thenr=rnd(1)
1045 r=rnd(1):printvt$(21);:print"->-->--";
1047 printht$(33);:print"--<--<-":forpa=1to70: nextpa
1050 r=rnd(1):printvt$(21);:print"-->-->-";
1053 printht$(33);:print"-<--<--":forpa=1to70: nextpa:ifkb$=""thengoto1040
1060 fori=1to7:print:forpa=1to60:nextpa: nexti:fori=5to20:printvt$(i)es$:next
1064 printvt$(7);:printht$(1);
1070 print"[196]o you need instructions ([159][217][154]/[159][206][154])? ";
1075 poke198,0:wait198,1:getyn$:ifyn$="y"thengosub12000:goto1090
1080 ifyn$<>"n"thenprintht$(1);:goto1070
1085 printht$(1)" "
1090 printvt$(7);:printht$(1);
1100 printvt$(9);:printht$(4);:print"[195]hoose a number between [153]1 and [153]5."
1105 print:print"[154][212]he numbers in parentheses have already": print
1107 printht$(7);:print"been used in this session."
1110 printvt$(16);:fori=1to5:printht$(6*i)i;
1113 i$=right$(str$(i),1)
1115 ifu(i)thenprintht$(6*i);:print"[154]([159]"i$"[154])";
1120 next
1130 printvt$(20)ht$(1)"[154]or press";
1132 printht$(18)"[176][192][174]":print" [154][[158][209][154]] to";
1134 printht$(18)"[221][158] [146][221]":print" [154][209]uit";
1136 printht$(18)"[173][192][189]":printvt$(21)ht$(19);
1138 poke198,0:wait198,1:getyn$
1139 ifyn$>" "andyn$<chr$(122)thenprint"[158]"yn$
1140 ifyn$="q"then15000
1150 ifyn$<"1"oryn$>"5"then1130
1160 nm$="story"+yn$:u(val(yn$))=1
2000 remget story
2005 forpa=1to200:nextpa:printvt$(20);: printht$(1);
2010 printvt$(23)ht$(6)"[129][204]oading story ([158]20 seconds[129]) "
2015 ti$="000000"
2020 open8,8,8,nm$+".text"
2030 rem
2040 input#8,tt$
2050 input#8,bl
2060 for i = 1 to bl
2070 input#8,c$(i): next
2080 input#8,ma
2090 fori=1toma:a$(i)=""
2100 get#8,x$
2104 ifx$<>chr$(13)thena$(i)=a$(i)+x$:goto2100
2105 next
2110 close8
2115 printvt$(23);:printht$(6);:print " [158][211]tory loaded "
2120 printvt$(24);:printht$(3);
2123 print" [205]essing with details (15 seconds) "
2124 ti$="000000"
2125 fori=1toma:t$="":forj=1tolen(a$(i)):m$=mid$(a$(i),j,1):ifm$="["thenm$=","
2130 t$=t$+m$:next:a$(i)=t$:next:fori=1toma
2135 ifright$(a$(i),1)="="thena$(i)=left$(a$(i),len(a$(i))-1)+" "
2140 next
2150 fh=bl:fl=1:fori=1tobl:ifval(c$(i))>100thenf(fh)=i:fh=fh-1:goto2170
2160 f(fl) = i:fl = fl + 1
2170 next:deffnr(x)=int(rnd(1)*fh)+1:fori=1tobl:f1=fnr(i):f2=fnr(i)
2175 t=f(f1):f(f1) = f(f2):f(f2) = t: next
2180 rem fill the blanks
2185 print"[147]"
2190 printht$(9)"[158] [198]illing in the blanks "
2200 fori=1tobl:c=val(c$(f(i))):ifc>100thenc$(f(i))=c$(c-100):goto2240
2210 printvt$(5)ht$(12)"[154][194]lank #[159]"i" [154]of [159]"fh" "
2215 ll=len(w$(c)):printvt$(7);:printht$(19-(ll /2));:forj=1toll+2
2216 print"[155]*";:next:printvt$(8);:printht$(19-(ll/2));:print"[155]*"w$(c)"[155]*"
2217 printvt$(9);:printht$(19-(ll/2));:forj=1toll+2:print"[155]*";:next
2218 printvt$(15)ht$(1)"[129][196]efinition:[158]":printd$(c)
2219 printvt$(20)"[129][197]xamples:[158]":printe$(c):printvt$(11)"--> [155]"bk$;
2220 mo=158:nc=30:gosub60500:c$(f(i))=a$
2225 forxx=5to23:printvt$(xx)es$:next:goto2240
2230 c$(f(i))=c$(f(i))+chr$(peek(j)-128):next
2240 next
3000 rem display
3001 sw=4
3002 poke198,0
3005 print"[147]"
3010 printvt$(2)ht$(19-(len(tt$)/2));:print" "tt$" [150]"
3020 printvt$(4);:printht$(1);:nl=0:r$="":s$="":t$="":b=1:h=1:a=0
3030 a=a+1:ifa>(ma)then3100
3040 r$=r$+a$(a)
3050 l=len(r$)
3060 ifleft$(r$,1)="]"thenr$=" "+ right$(r$,l-1):rt=1
3065 getx$:ifx$<>""thengoto3160
3070 if left$ (r$,1) = "*" then t$ = t$ + c$(b):b = b + 1: goto 3120
3080 ifleft$(r$,1)<>" "thenws=abs(len(t$)> 0):s$(ws)=s$(ws)+left$(r$,1):goto3120
3090 s=len(s$(0))+len(s$(1))+len(t$):ifs+h>39thenprint:h=1:nl=nl+1
3095 ifs+h>39thenifnl>10thengosub4000:nl=0:printvt$(4);
3100 prints$(0);:print""t$"[146]";:prints$(1)" ";
3105 h=h+s+1:s$(0)="":s$(1)="":t$="":ifa>(ma)then3160
3110 ifrt<>0thenrt=0:print"":h=1:nl=nl+1:ifnl>10thengosub4000:nl=1:printvt$(4);
3120 l=l-1
3130 ifl=0thenr$="":goto 3030
3140 r$ = right$ (r$,l)
3150 goto 3060
3160 forpa=1to200:nextpa:print:forpa=1to200:nextpa:print
3165 printvt$(23);:printht$(13);:print"-- [212]he [197]nd --"
3167 gosub 4000:printchr$(147);
3170 printchr$(147);:printvt$(11);:print"[154][215]ant to re-read your story? ([217]/[206]) ";
3175 poke198,0:wait198,1:getyn$:ifyn$="y"then3000
3180 ifyn$<>"n"then3170
3190 printchr$(147);:printvt$(11);:print"[215]ant to fill in another story? ([217]/[206]) ";
3195 poke198,0:wait198,1:getyn$:ifyn$="y"thenprintchr$(147);:gosub12500
3198 ifyn$="y"thenprintvt$(7);:printht$(1);:goto1070
3200 if yn$ <>"n"then 3190
3210 goto 15000
4000 rem bottom of screen
4010 rem
4020 rem
4030 printvt$(24)" [[208]ress any key to continue][150]"
4035 poke198,0:wait198,1:getyn$:fori=24toswstep-1:printvt$(i)es$:next
4040 return
5000 r$="":s$="":t$="":s=1
5010 fori=1toma
5015 r$=r$+a$(i)
5020 forx=1tolen(r$)
5030 if mid$(r$,x,1)="*"thens$=left$(r$,x-1):t$=c$(s):r$=right$(r$,len(r$)-x-1)
5040 if mid$(r$,x,1)="["thenr$=left$(r$,x-1)+","+right$(r$,len(r$)-x-1)
5045 if mid$(r$,x,1)="]"thenprintleft$(r$,x-1)
5050 if t$<>""thenprints$""t$"[146]";:t$="":s=s+1:goto5020
5060 next x
5070 next i
5080 return
10000 rem init
10010 dimw$(30),c$(100),a$(100),f(100)
10020 dim d$(30),e$(30): rem defs & examples
10025 z=0:remkb=49152:cl=49168:zb=-16336
10030 for i = 1 to 22
10040 read w$(i),d$(i),e$(i):next
10050 return
11000 rem word types & defs
11010 data"[206]oun","a person, place or thing","[205]ailman / [200]eaven / [211]chool [194]us"
11020 data"[195]oncrete [206]oun",a noun with physical existence
11025 data"[195]atalog / [204]amb / [197]levator"
11030 data"[193]bstract [206]oun",a concept or state of mind,"[210]eality / [208]eace / [207]pinion"
11040 data"[208]lural [206]oun","a group of persons, places or things"
11045 data"[205]ice / [196]oors / [208]izzas"
11050 data"[205]aterial/[211]ubstance",a quantity of something
11055 data"[211]ulphuric [193]cid / [212]ar / [205]olasses"
11060 data"[193]djective",describes a person or a thing,"[195]lever / [199]reen / [213]gly"
11070 data"[193]dverb",describes how something is done. usually ends in -ly
11075 data"[209]uickly / [211]loppily / [200]appily"
11080 data"[208]resent [212]ense [214]erb ([201]...)",an action word,"[197]at / [213]nwrap / [212]hink"
11090 data"[208]resent [212]ense [214]erb ([200]e/[211]he/[201]t...)",an action word
11095 data"[197]ats / [213]nwraps / [212]hinks"
11100 data"[208]ast [212]ense [214]erb"
11105 dataan action that already happened. often ends in -ed
11107 data"[193]te / [213]nwrapped / [212]hought"
11110 data"-ing [214]erb",an action word in -ing form
11115 data"[212]hinking / [197]ating / [213]nwrapping"
11120 data"[204]ocation",any place name,"[194]oston / [202]upiter / [212]he [194]asement"
11130 data"[206]umber",a # either spelled out or in numerals
11135 data"147 / [198]our [205]illion / [211]ix and a [200]alf"
11140 data"[195]olor",the name of any color or hue,"[194]lue / [196]ull [199]ray / [207]ff-[215]hite"
11150 data"[193]nimal",the name of any living thing,"[200]orse / [212]ermite / [194]ald [197]agle"
11160 data"[197]xclamation"
11165 data"[211]omething you might say when surprised or excited"
11168 data"[215]ow / [207]ops / [200]ow [193]bout [212]hat"
11170 data"[211]illy [